package com.wuliupai.delivery.wuliupaidelivery.db;

/**
 * Descriptions：数据库实体类
 * <p>
 * Author：ChenME
 * Date：11/21/2016
 * Email：ibelieve1210@163.com
 */
public class City implements Comparable<City>{
    private long _id;

    private String provinceCode;//省份编码

    private String code;//城市编码

    private String cityName;//城市

    public String firstLetter;//首字母

    public City() {
    }

    public City(String provinceCode, String code, String cityName, String firstLetter) {
        this.provinceCode = provinceCode;
        this.code = code;
        this.cityName = cityName;
        this.firstLetter = firstLetter;
    }

    public String getProvinceCode() {
        return provinceCode;
    }

    public void setProvinceCode(String provinceCode) {
        this.provinceCode = provinceCode;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getCityName() {
        return cityName;
    }

    public void setCityName(String cityName) {
        this.cityName = cityName;
    }

    public String getFirstLetter() {
        return firstLetter;
    }

    public void setFirstLetter(String firstLetter) {
        this.firstLetter = firstLetter;
    }

    @Override
    public String toString() {
        return "City{" +
                "_id=" + _id +
                ", provinceCode='" + provinceCode + '\'' +
                ", code='" + code + '\'' +
                ", cityName='" + cityName + '\'' +
                ", firstLetter='" + firstLetter + '\'' +
                '}';
    }

    @Override
    public int compareTo(City another) {
        return this.firstLetter.compareTo(another.firstLetter);
    }
}
